﻿using System;
using System.Collections.Generic;
using System.Text;

namespace UndoCommandSample
{
    class CalculatorForm
    {
        public Command Command { set; get; }
        public void Compute(int value)
        {
            int i = Command.Excute(value);
            Console.WriteLine($"执行结果为{i}");
        }

       

        public void Undo()
        {
            int i = Command.Undo();
            Console.WriteLine($"执行撤销,运行结果为{i}");
        }
    }
}
